home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk111 / db / db.doc < prev    next >
Encoding:
Text File  |  1995-03-19  |  12.4 KB  |  390 lines

  1.  
  2.  
  3.                     DB
  4.                     The Manual
  5.  
  6.                  by Alan Farrell
  7.                     (c) 1989
  8.            DB Produced using TDI Modula2 and the ARP library v3.0.
  9.  
  10.  
  11.             1. Overview.
  12.  
  13.             2. Starting the program.
  14.  
  15.             3. The menus.
  16.  
  17.             4. A Small Tutorial.
  18.  
  19.             5. Searching.
  20.  
  21.             6. Reports/Printing.
  22.  
  23.             7. If you want to...
  24.  
  25.             8. Everyting I can't think of a topic for.
  26.  
  27.  
  28. ----------------------------------------------------------------------------
  29.  
  30.      This software is *NOT* public domain. It is FREE. It cannot be sold
  31.      or altered without express written consent from the author. This
  32.      program is also NOT shareware. I do not expect you to send me money
  33.      for this program, I am not a starving artist. If it will make you
  34.      feel better, feel free to send away, but don't feel guilty if you
  35.      don't.
  36.  
  37.      This software may be freely distributed so long as all files are
  38.      included intact and unchanged. No one may charge any more than
  39.      the cost of distribution for this software.
  40.  
  41.      If you want to contact me for any reason, bug reports, ideas, a job,
  42.      please leave E-mail on plink. I check in about every 2 weeks.
  43.  
  44. ----------------------------------------------------------------------------
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. 1. Overview.
  53.  
  54.    This is a very basic database program. It allows you to create a database
  55.    with up to 50 fields. Each field can be from 1 to about 3000 characters.
  56.    There can be a maximum of about 1.2 Million records to a database. Each
  57.    record can be a maximum of about 3000 characters long. This means that if
  58.    you create a field of 1000 characters that there are only about 2000
  59.    characters remaining for the other fields in the record.
  60.  
  61.  
  62.  
  63.  
  64. 2. Starting the program.
  65.  
  66.    To run from cli type either "db" or "run db".
  67.  
  68.    To run from Workbench double click the "db" icon.
  69.  
  70.    This program accepts no command line parameters and does not check for
  71.    extended selection from Workbench.
  72.  
  73.    This program expects the default font to be a 8 point non-proportional
  74.    font like Topaz8, the default 80-column font. If the characters are
  75.    overlapping the grid lines, you're using the wrong font.
  76.  
  77.  
  78. 3. The Menus.
  79.  
  80.    TEMPLATE        DATABASE
  81.  
  82.    Load         Open
  83.    Save         Close
  84.    Save As        Next   R
  85.    Clear        Prev   R
  86.    Credits        Delete R
  87.             Match  R
  88.             Next M R
  89.             Print  R
  90.             Report
  91.  
  92.    Template:Load      Loads a pre-created template into the template editor.
  93.    Template:Save      Saves the current template under the current filename.
  94.    Template:Save As   Saves the current template using a new name.
  95.    Template:Clear     Clears the current template.
  96.    Template:Credits   Gives credit where credit is due.
  97.  
  98.    Database:Open      Opens a database (DB).
  99.    Database:Close     Closes the currently open DB.
  100.    Database:Next   R  Loads and displays the next record in the file.
  101.    Database:Prev   R  Loads and displays the previous record in the file.
  102.    Database:Delete R  Delete the current record. Note: this function writes
  103.               a record containing only spaces to the disk. The screen
  104.               is left the same. If you accidently delete a record,
  105.               pressing the Numeric Enter key will re-write the info
  106.               to the record.
  107.    Database:Match  R  Searches the current DB for any records that match
  108.               the info in the current record. Note: any spaces in
  109.               the current record are considered wildcard characters
  110.               and are ignored in the record comparison.
  111.    Database:Next M R  From the current position in the database, searches
  112.               forward for the next match.
  113.  
  114.    Database:Print  R  Prints the current record to PRT:
  115.  
  116.    Database:Report    Prints all records matching the current record to
  117.               either PRT: or a file user specifies.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. 4. A Small Tutorial.
  125.  
  126.    When first starting the db program, one is presented by a screen grid
  127.    representing all the characters that will be shown when entering data
  128.    into the database. Each box can contain either a character or a field-
  129.    defining (FD) character. You can move about the grid by using the cursor
  130.    keys or by clicking on the box you want to fill.
  131.  
  132.    A character is any printable character (except "`"). These are entered
  133.    into the template by simply typing. The are not used in DB input
  134.    operations-they are there simply for user reference to fields.
  135.  
  136.    A FD character is entered by pressing the "`" key.
  137.  
  138.    Lets begin.
  139.    Start the program. Now press the "`" key. An orange square appears in
  140.    the first square and the cursor advances one square. This is a FD
  141.    character. Where FD characters is used in the template define where and
  142.    how long the fields are in the DB.
  143.  
  144.  
  145.    If you were to enter 3 lines of 30 FD characters you would have a DB
  146.    consisting of 3 fields each 30 characters long. You could enter text
  147.    around the FDs to define what each field is.
  148.  
  149.  
  150.    Example:  (using "*" as the FD)
  151.  
  152.  
  153.  
  154.       Name:***************************,**************
  155.  
  156.       Ph# :***-***-****
  157.  
  158.       Addr:******************************************
  159.  
  160.  
  161.  
  162.    The above example creates a simple DB that has 6 fields used to store
  163.    information about a person.
  164.  
  165.       F1: The last name field
  166.       F2: (after the comma)-The First name field.
  167.  
  168.      ** Note **
  169.         The comma breaks up the name field into 2 seperate fields.
  170.         ANY GAP IN A STRING OF FDs WILL DO THE SAME.
  171.      **********
  172.  
  173.       F3: The area code of the ph#.
  174.       F4: The prefix of the ph#.
  175.       F5: The suffix of the ph#.
  176.       F6: The address.
  177.  
  178.  
  179.  
  180.    ** Note **
  181.       After creating a template/DB and saving it, it is no longer possible
  182.       to add, subract, or change the size of any fields. It is FIXED, so
  183.       make sure you plan out what you want done before you do it!
  184.  
  185.       The program will let you make these changes so you can base another
  186.       DB on the first one, and it will even let you save it under the same
  187.       name, but if you do you take the (very likely) chance of trashing
  188.       the first DB.
  189.  
  190.       You have been WARNED!
  191.    **********
  192.  
  193.  
  194.    Back to the tutorial! After creating the above template, choose the
  195.    TEMPLATE:Save As option and enter a name for the template/db into it.
  196.    Choose OK in the file-requester. The template will be saved and if
  197.    a DB does not exist with that name one will be created.
  198.  
  199.    Now, choose DATABASE:Open option and choose the filename you just
  200.    created. Ignore the .tmpl file as it is for internal use only. Choose
  201.    OK from the file-requester. The DB should be opened and a blank record
  202.    should be displayed. The window title should say "EOF (End of File)".
  203.    This means that currently you are at the end of the file, ready to
  204.    enter a new record.
  205.  
  206.    You can move around this screen many ways.
  207.  
  208.       To move forward in a field press the Cursor right key, type anything,
  209.       or press the space bar. You cannot exit the field using these keys.
  210.  
  211.       To move back in a field press the Cursor left key or the <- key.
  212.  
  213.       To move forward to the next field press either:
  214.      The regular return key or
  215.      The Cursor down key or
  216.      The tab key or
  217.      The Numeric pad + key
  218.  
  219.       To move back a field press either:
  220.      The Cursor up key or
  221.      The Numeric pad - key
  222.  
  223.    When you are done entering info into the record, press the Numeric Enter
  224.    key. This key will save the record on screen to disk into the current
  225.    record number and advance the record number by 1. The previous records
  226.    info is left on the screen in case you have many records that share info
  227.    in some fields.
  228.  
  229.    The title bar should still say EOF. To go back to the record we just
  230.    entered choose DATABASE:Prev R from the menu or press Amiga-p or press
  231.    the F1 key. This will move us back to the first record. You can now edit
  232.    the record again and save it again if you made a mistake.
  233.  
  234.    If you do not save it again, and you want to edit the next record, press
  235.    either the F2 key, Amiga-N, or choose DATABASE:Next R from the menu.
  236.  
  237. 5. Searching.
  238.  
  239.    To Search a DB for a specific bit of info, first open the DB.
  240.    Next, type the search criteria into the blank record.
  241.  
  242.    To use the example above, say you want to find all the people who live
  243.    in the 916 area code. You would leave all other fields blank and enter
  244.    916 into the area code field. Then either press Amiga-M or choose
  245.    DATABASE:Match R. The DB will be searched for any matches. If one is
  246.    found it will be displayed. You can edit it or find the next match by
  247.    either pressing Amiga-/ or choosing DATABASE:Next M R.
  248.  
  249. 6. Reports/Printing.
  250.  
  251.    Note: The only print routines that have been tested are the routines
  252.      that print to a file. I don't have a printer and I can't guarantee
  253.      any output.
  254.  
  255.    Right now there are only 2 basic printing functions. The first is
  256.    DATABASE:Print  R. This prints the current record to the PRT: device.
  257.  
  258.    The second print function is DATABASE:Report. This function first asks
  259.    you if you want to print to a file or to the PRT: device. If you print
  260.    to PRT: output will go directly to your printer. If you choose to print
  261.    to a file output will go to the file you specify in the file-requester in
  262.    exactly the same format as it would go to the printer. This is useful if
  263.    you want to import DB records into a word processor or you want to print
  264.    the report later directly from the file.
  265.  
  266.    It works like this. Fill out a record as if you were going to do a
  267.    search, then choose DATABASE:Report or press Amiga-R or press F4. A
  268.    requester will ask you where you want output to go. If you choose to
  269.    print to a file the filerequester will appear so you can pick a file.
  270.  
  271.    After you choices have been made Report will search the DB for all
  272.    records matching the search record. If any are found they will be
  273.    output as they are shown in the TEMPLATE for this DB. That's it. Basic,
  274.    but it gets the job done.
  275.  
  276.  
  277. 7. If you want to...
  278.  
  279.    Load a previously created template.
  280.       Choose TEMPLATE:Load, enter/choose the filename, click OK.
  281.  
  282.  
  283.  
  284.    Save a template.
  285.       Choose TEMPLATE:Save to save with current name or TEMPLTE:Save As
  286.       to save with a new name.
  287.  
  288.  
  289.  
  290.    Clear a template.
  291.       Choose TEMPLATE:Clear.
  292.  
  293.  
  294.  
  295.    See my name.
  296.       Choose TEMPLATE:Credits.
  297.  
  298.  
  299.  
  300.    Open a database file.
  301.       Choose DATABASE:Open, enter/choose the filename, click OK.
  302.  
  303.  
  304.  
  305.    Close a database file.
  306.       Choose DATABASE:Close. This will close the DB and return to template
  307.       editing.
  308.  
  309.  
  310.  
  311.    See the next record in a DB.
  312.       Choose DATABASE:Next R.
  313.  
  314.  
  315.  
  316.    See the previous record in a DB.
  317.       Choose DATABASE:Prev R.
  318.  
  319.  
  320.  
  321.    See the first record in a DB.
  322.       Do a Search of the DB with the search record blank. This will match
  323.       all records, and will display the first record.
  324.  
  325.  
  326.  
  327.    See the last record in a DB.
  328.       Do a Search of the DB with a search record you know will have no
  329.       matches. Search will search the DB to the end, tell you there are no
  330.       matches, and leave you at the last record.
  331.  
  332.  
  333.  
  334.    Delete a record.
  335.       Choose DATABASE:Delete R. This really doesnt delete the record, it
  336.       writes spaces to the record on disk. It also leaves the record on
  337.       screen, so if you do it accidentally, just press the NumEnter key
  338.       and it will re-write the record to the DB.
  339.  
  340.  
  341.  
  342.    Search for a specific record/set of criteria.
  343.       Clear out the current record, enter search criteria, and choose
  344.       DATABASE:Search R.
  345.  
  346.  
  347.  
  348.    Find the next match in a search.
  349.       Choose DATABASE:Next M R.
  350.  
  351.  
  352.  
  353.    Print the current record to PRT:.
  354.       Press F3 or Amiga-H or choose DATABASE:Print  R.
  355.  
  356.  
  357.  
  358.    Print the current record to a file.
  359.       Press F4 or Amiga-R or choose DATABASE:Report. Choose file for output.
  360.       Because the current record is (if you don't have duplicate records)
  361.       the only record that will match the search criteria, it will be
  362.       printed.
  363.  
  364.    Print all the records to file or PRT:
  365.       Make a blank search record. Choose DATABASE:Report. Choose the output
  366.       method. Because the search record is blank it will match all records
  367.       and they will be printed.
  368.  
  369.  
  370. 8. Everything I cant think of a topic for.
  371.  
  372.    Remember, don't be shy with records on screen. You can completely erase
  373.    the current on-screen record to use it for a search. You only premanently
  374.    erase records when you blank it out and press NumEnter.
  375.  
  376.    Watch the record# in the title bar. Some functions automaticly advance
  377.    to the next record, some don't. Watch it!
  378.  
  379.    Remember, DATABASE:Delete only deletes the record in the DB. It leaves
  380.    it on the screen so if you change your mind all you have to do is press
  381.    NumEnter to restore it on disk.
  382.  
  383.    REPORT ALL BUGS!! They don't get fixed if I don't know about them!
  384.  
  385.  
  386.                          Alan Farrell
  387.                          11/07/89
  388.  
  389.                          plink: ajf
  390.